package com.greateffect.littlebud.lib.utils;


import com.greateffect.littlebud.lib.BuildConfig;
import com.greateffect.littlebud.lib.account.SAccountUtil;

/**
 * Created by ZengCS on 2019/1/16.
 * E-mail:zcs@sxw.cn
 * Add:成都市天府软件园E3-3F
 */

public class SPKeys {
    // public static final String KEY_REBOOT_FLAG = "KEY_REBOOT_FLAG";
    public static final String KEY_REBOOT_FLAG = "KEY_REBOOT_FLAG" + BuildConfig.VERSION_CODE;
    public static final String KEY_OVERLAY_SERVICE_RUNNING = "KEY_OVERLAY_SERVICE_RUNNING";
    public static final String KEY_CONNECT_SERVICE_RUNNING = "KEY_CONNECT_SERVICE_RUNNING";

    /**
     * 策略相关
     */
    public class Policy {
        public static final String SERVER_VERSION_CODE = "POLICY_SERVER_VERSION_CODE";
        public static final String LOCAL_VERSION_CODE = "POLICY_LOCAL_VERSION_CODE";
        public static final String HEART_TIME = "POLICY_HEART_TIME";
        public static final String SYNC_TIME = "POLICY_SYNC_TIME";
        public static final String CONTENT = "POLICY_CONTENT";
        public static final String TARGET_RULE = "POLICY_TARGET_RULE";
        public static final String TARGET_TIME_CATEGORY = "POLICY_TARGET_TIME_CATEGORY";
        public static final String APP_TYPES = "POLICY_APP_TYPES";
        public static final String RULE_VERSION_DTO = "POLICY_RULE_VERSION_DTO";
        public static final String ALL_TIME_APP_LIST = "POLICY_ALL_TIME_APP_LIST";
        public static final String USER_APP_LIST = "POLICY_USER_APP_LIST";
    }

    public class Account {
        public static final String IS_LOGIN = "IS_LOGIN";
        public static final String ACCOUNT_INFO = "ACCOUNT_INFO";
        public static final String ACCOUNT_BIND_INFO = "ACCOUNT_BIND_INFO";
        public static final String PUSH_CLIENT_ID = "PUSH_CLIENT_ID";
        public static final String KEY_LOGIN_CACHE_INFO = SAccountUtil.KEY_LOGIN_CACHE_INFO;
    }

    public static String getCustomKey(String key, String accountId) {
        return key + "_" + accountId;
    }
}
